package com.wgchao.authmanager.infrastructure.jpa.repository;

import com.wgchao.authmanager.infrastructure.jpa.entity.UserInfo;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

/**
 * @ClassName: UserInfoJpaReposotory
 * @author: wgchao
 * @createTime: 2020/4/29 3:16 PM
 * @Description: TODO
 */
@Repository
public interface UserInfoJpaReposotory extends JpaRepository<UserInfo, Long>, JpaSpecificationExecutor<UserInfo> {
    UserInfo findFirstByUnameAndDelFalse(String uname);
    UserInfo findFirstByUname(String uname);
    Page<UserInfo> findAll(Specification specification, Pageable pageable);
}
